#pragma once
//============================================================================
// Copyright (C) 2003-2013 Brett R. Jones 
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses 
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================

#include "PktDefs.h"
#include <VxUtilLib/VxPktHdr.h>

#define LOGIN_DENIED_NEED_NEWER_VERSION   1
#define LOGIN_DENIED_NEED_OLDER_VERSION   2

#pragma pack(push) 
#pragma pack(1)
class PktKeyReply : public VxPktHdr
{
public:
    unsigned short u16PktLibVersion;	// Packet Library Version
    unsigned short u16CapFlags;			// capabilities flags
    unsigned short u16OsType;			// OS runing calling app, 0 = windows 1 = linux 2 = other
    unsigned char u8LoginStatus;		// Login Status
    char as8Res[ 5 ];					// reservered for future use
    unsigned short u16OnlineCnt;		// number of online logons
    unsigned long u32AppVersion;		// Application version number
    char as8AppVersion[ MAX_APP_VERSION_STR_LEN + 1 ];	// Application name and version
    char as8AppExecutePath[ MAX_PATH ];                 // path application executed from
    char as8LogonMsg[ MAX_LOGON_MSG_LEN + 1 ];			// Logon message
    unsigned char au8SessionKey[ MAX_SYM_KEY_LEN ];		// encrypted session key
    char atcUserList[ MAX_USER_LIST_LEN + 1 ];                  // list of admins logged on

    PktKeyReply();

    void CalcPktLen( void );
};
#pragma pack(pop)


